#include "abstr_emp.h"

abstr_emp::abstr_emp():lname("none"),fname("none"),job("none")
{
	
}
abstr_emp::abstr_emp(const string& fn, const string& ln, const string& job) :lname(fn), fname(ln), job(job)
{

}
void abstr_emp::ShowAll()const
{
	cout << "Name: " << fname << "." << lname << endl;
	cout << "job: " << job << endl;
}
void abstr_emp::SetAll()
{
	getline(cin,fname);
	getline(cin,lname);
	getline(cin,job);
}
ostream& operator<<(ostream& os, const abstr_emp& e)
{
	os << "Name: " << e.fname << "." << e.lname << endl;
	os << "job: " << e.job << endl;
	return os;
}
abstr_emp::~abstr_emp()
{

}


employee::employee():abstr_emp()
{

}
employee::employee(const string& fn, const string& ln, const string& job):abstr_emp(fn,ln,job)
{

}
void employee::ShowAll()const
{
	abstr_emp::ShowAll();
}
void employee::SetAll()
{
	abstr_emp::SetAll();
}


manager::manager():abstr_emp(),inchargeof(0)
{

}
manager::manager(const string& fn, const string& ln, const string& job, int ico):abstr_emp(fn,ln,job),inchargeof(ico)
{

}
manager::manager(const abstr_emp& e, int ico):abstr_emp(e),inchargeof(ico)
{

}
manager::manager(const manager& m):abstr_emp(m),inchargeof(m.inchargeof)
{

}
void manager::ShowAll()const
{
	abstr_emp::ShowAll();
	cout << "in charge of" << inchargeof << endl;
}
void manager::SetAll()
{
	abstr_emp::SetAll();
	cin >> inchargeof;
	while (cin.get()!='\n')
	{
		continue;
	}
}


fink::fink():abstr_emp(),reportsto("none")
{

}
fink::fink(const string& fn, const string& ln, const string& job, const string& rpo):abstr_emp(fn,ln,job),reportsto(rpo)
{

}
fink::fink(const abstr_emp& e, const string& rpo):abstr_emp(e),reportsto(rpo)
{

}
fink::fink(const fink& e):abstr_emp(e),reportsto(e.reportsto)
{

}
void fink::ShowAll()const
{
	abstr_emp::ShowAll();
	cout << "repot: " << reportsto << endl;
}
void fink::SetAll()
{
	abstr_emp::SetAll();
	getline(cin, reportsto);
}


highfink::highfink()
{

}
highfink::highfink(const string& fn, const string& ln, const string& job, const string& rpo, int ico):abstr_emp(fn,ln,job),manager(fn,ln,job,ico),fink(fn,ln,job,rpo)
{

}
highfink::highfink(const abstr_emp& e, const string& rpo, int ico):abstr_emp(e),manager(e,ico),fink(e,rpo)
{

}
highfink::highfink(const fink& f, int ico):abstr_emp(f),fink(f),manager(f,ico)
{

}
highfink::highfink(const manager& m, const string& rpo):abstr_emp(m),manager(m),fink(m,rpo)
{

}
highfink::highfink(const highfink& h):abstr_emp(h),manager(h),fink(h)
{

}
void highfink::ShowAll()const
{
	abstr_emp::ShowAll();
	cout <<"inchargeof: " << InChargeOf() << endl;
	cout <<"report: " << ReportsTo() << endl;

}
void highfink::SetAll()
{
	abstr_emp::SetAll();
	cin >> InChargeOf();
	while (cin.get()!='\n')
	{
		continue;
	}
	getline(cin, ReportsTo());
}